using System;
using System.Collections;
using System.Windows.Forms;
using System.Diagnostics;

namespace MiGuava
{
	sealed class modHelp
	{		
		public enum HelpCommands
		{
			HelpTopics = 1,
			HelpIndex = 3
		}
		
		public enum HelpKeys
		{
			CTX_HelpIndex = 0            
		}

        public static string GetHelpURL(HelpKeys cHelpKey)
        {
            string strURL;
            if (cHelpKey == HelpKeys.CTX_HelpIndex)
            {
                strURL = Properties.Resources.C_HelpURL + "?CMD=" + System.Convert.ToInt32(HelpCommands.HelpIndex);
            }
            else
            {
                strURL = Properties.Resources.C_HelpURL + "?CMD=" + System.Convert.ToInt32(HelpCommands.HelpTopics) + "&KEY=" + System.Convert.ToInt32(cHelpKey);
            }

            return strURL;
        }        

		public static void ShowHelp (HelpKeys cHelpKey)
		{
            string strURL = GetHelpURL(cHelpKey);
            Program.OpenURL(strURL);			
		}        
	}
	
}
